package com.supcon.exchangedata.repository.slave7;


import com.supcon.exchangedata.pojo.entity.mysql.operation.lq.LqDailyPitchProduction;
import com.supcon.exchangedata.pojo.entity.mysql.operation.sw.WaterDailyOpertionInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *   沥青生产量
 * @Author: yangbin
 * @Date: 2022/04/20/9:00
 * @Description:
 */
public interface SlaveLqOperationInfo1 extends JpaRepository<LqDailyPitchProduction, Long> {


    @Transactional
    @Query(nativeQuery = true, value = "SELECT * FROM lq_daily_pitch_production WHERE biz_time = (SELECT MAX(product_date) FROM lq_daily_pitch_production)")
    LqDailyPitchProduction findTopData();

    List<LqDailyPitchProduction> findAllByProductDateBetween(LocalDate startTime, LocalDate endTime);


}
